Release 10.1A: OpenEdge Data Management:
SQL Reference
SET CONNECTION
Switches the application from one established connection to another. This resumes the connection associated with the specified
connection_name, restoring the context of that database connection to the same state it was in when suspended.Syntax
connection_nameThe name of the connection as either a character literal or host variable. If the
SET CONNECTIONstatement omits a connection name, the default is the name of the database. Connection names must be unique.DEFAULTSets the
ExamplesDEFAULTconnection as the current connection.The first example shows how to establish a database as the current database:
The
SET CONNECTIONcommand sets the database associated with the connection namedconn_1to the status of current database. The connection namedconn_1must be associated with an established connection. UseSET CONNECTION DEFAULTto set current the database associated with theDEFAULTconnection. In this example, the statement suspends theconn_1connection, which had been current:
See also the last example for the
DISCONNECTstatement, which illustrates theCONNECT,SET CONNECTION, andDISCONNECTstatements in combination.Authorization
None
Related statements
CONNECT, DISCONNECT
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |